/**********************************
 * @Author: Your Name
 * @LastEditor: Your Name
 * @LastEditTime: 2025-11-09
 * Copyright © 2025 Your Name
 **********************************/

import { designFileApi } from '@/api/pms'

// 设计文件标签管理相关API
export default {
  // 获取标签列表
  read: async (params = {}) => {
    try {
      const result = await designFileApi.getTags(params)
      return result
    } catch (error) {
      console.error('获取标签列表失败:', error)
      throw error
    }
  },

  // 创建标签
  create: async (data) => {
    try {
      const result = await designFileApi.createTag(data)
      return result
    } catch (error) {
      console.error('创建标签失败:', error)
      throw error
    }
  },

  // 更新标签
  update: async (data) => {
    try {
      const result = await designFileApi.updateTag(data)
      return result
    } catch (error) {
      console.error('更新标签失败:', error)
      throw error
    }
  },

  // 删除标签
  delete: async (id) => {
    try {
      const result = await designFileApi.deleteTag(id)
      return result
    } catch (error) {
      console.error('删除标签失败:', error)
      throw error
    }
  },
}